{% load bootstrap3 %}

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>学习笔记</title>

    {% bootstrap_css %}
    {% bootstrap_javascript %}
</head>
<body>
<nav class="navbar navbar-default navbar-static-top">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed"
                    data-toggle="collapse" data-target="#navbar"
                    aria-expanded="false" aria-controls="navbar"></button>
            <a class="navbar-brand" href="{% url 'll:index' %}"> Learning Log</a>
        </div>

        <div id="navbar" class="navbar-collapse collapse">
            <ul class="nav navbar-nav">
                <li><a href="{% url 'll:topics' %}">Topics</a></li>
            </ul>

            <ul class="nav navbar-nav navbar-right"> {% if user.is_authenticated %}
                <li><a>Hello, {{ user.username }}.</a></li>
                <li><a href="{% url 'users:logout' %}">log out</a></li> {% else %}
                <li><a href="{% url 'users:register' %}">register</a></li>
                <li><a href="{% url 'users:login' %}">log in</a></li> {% endif %}
            </ul>
        </div><!--/.nav-collapse -->
    </div>
</nav>

<div class="container">

    <div class="page-header">
        {% block header %}{% endblock header %}
    </div>
    <div>
        {% block content %}{% endblock content %}
    </div>
</div> <!-- /container -->

</body>
</html>

{##}
{#<p>#}
{#    <a href="{% url 'll:index' %}">learning logs</a>-#}
{#    <a href="{% url 'll:topics' %}">topics</a>-#}
{#    {% if user.is_authenticated %}#}
{#        你好,{{ user.username }},#}
{#        <a href="{% url 'users:logout' %}">注销</a>#}
{#    {% else %}#}
{#        <a href="{% url 'users:login' %}">去登录</a>-#}
{#        <a href="{% url 'users:register' %}">注册</a>#}
{##}
{#    {% endif %}#}
{#</p>#}

{#{% block content %}#}
{##}
{#{% endblock content %}#}

